<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateHealthRecordsTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('health_records', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name', 50)->default('')->comment('姓名');
            $table->integer('blood_pressure_high')->default(0)->comment('血压/高');
            $table->integer('blood_pressure_low')->default(0)->comment('血压/低');
            $table->float('blood_sugar')->default(0)->comment('血糖');
            $table->integer('heart_rate')->default(0)->comment('心率');
            $table->timestamp('record_time')->comment('记录时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('health_records');
    }
}
